package com.scn.base.util;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;

public class URLCodeUtil {
	public static String encoderUtf8(String src){
		String dest="";
		try {
			dest=URLEncoder.encode(src, "UTF-8");
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
		return dest;
	}
	public static String decoderUtf8(String src){
		String dest="";
		try {
			dest=URLDecoder.decode(src, "UTF-8");
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
		return dest;
	}
}
